package Myutils;

import java.util.Arrays;

public class StringUtil {
    public static String replace(String str,char oldChar,char newChar) {
        int len = str.length();
        int i = -1;
        char[] val = str.toCharArray();
        while ( ++i < len) {
            if(val[i] != oldChar) {
                continue;
            } else {
                val[i] =newChar;
            }
        }
        return String.valueOf(val);
    }
    public static boolean isEmpty(String str) {
        return str == null || str.length() == 0;
    }
}
